/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * CommandSubmission
 */
@JsonPropertyOrder({
  CommandSubmission.JSON_PROPERTY_COMPOUND_IDS,
  CommandSubmission.JSON_PROPERTY_ALIGNED_FEATURE_IDS,
  CommandSubmission.JSON_PROPERTY_COMMAND
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class CommandSubmission {
  public static final String JSON_PROPERTY_COMPOUND_IDS = "compoundIds";
  @jakarta.annotation.Nullable
  private List<String> compoundIds;

  public static final String JSON_PROPERTY_ALIGNED_FEATURE_IDS = "alignedFeatureIds";
  @jakarta.annotation.Nullable
  private List<String> alignedFeatureIds;

  public static final String JSON_PROPERTY_COMMAND = "command";
  @jakarta.annotation.Nonnull
  private List<String> command = new ArrayList<>();

  public CommandSubmission() {
  }

  public CommandSubmission compoundIds(@jakarta.annotation.Nullable List<String> compoundIds) {
    
    this.compoundIds = compoundIds;
    return this;
  }

  public CommandSubmission addCompoundIdsItem(String compoundIdsItem) {
    if (this.compoundIds == null) {
      this.compoundIds = new ArrayList<>();
    }
    this.compoundIds.add(compoundIdsItem);
    return this;
  }

  /**
   * Compounds that should be the input for this Job  Will be converted to the respective alignedFeatureIds for computation.   At least one compoundId or alignedFeatureId needs to be specified.
   * @return compoundIds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPOUND_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getCompoundIds() {
    return compoundIds;
  }


  @JsonProperty(JSON_PROPERTY_COMPOUND_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCompoundIds(@jakarta.annotation.Nullable List<String> compoundIds) {
    this.compoundIds = compoundIds;
  }

  public CommandSubmission alignedFeatureIds(@jakarta.annotation.Nullable List<String> alignedFeatureIds) {
    
    this.alignedFeatureIds = alignedFeatureIds;
    return this;
  }

  public CommandSubmission addAlignedFeatureIdsItem(String alignedFeatureIdsItem) {
    if (this.alignedFeatureIds == null) {
      this.alignedFeatureIds = new ArrayList<>();
    }
    this.alignedFeatureIds.add(alignedFeatureIdsItem);
    return this;
  }

  /**
   * Features (aligned over runs) that should be the input for this Job   At least one compoundId or alignedFeatureId needs to be specified.
   * @return alignedFeatureIds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ALIGNED_FEATURE_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getAlignedFeatureIds() {
    return alignedFeatureIds;
  }


  @JsonProperty(JSON_PROPERTY_ALIGNED_FEATURE_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAlignedFeatureIds(@jakarta.annotation.Nullable List<String> alignedFeatureIds) {
    this.alignedFeatureIds = alignedFeatureIds;
  }

  public CommandSubmission command(@jakarta.annotation.Nonnull List<String> command) {
    
    this.command = command;
    return this;
  }

  public CommandSubmission addCommandItem(String commandItem) {
    if (this.command == null) {
      this.command = new ArrayList<>();
    }
    this.command.add(commandItem);
    return this;
  }

  /**
   * Get command
   * @return command
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_COMMAND)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List<String> getCommand() {
    return command;
  }


  @JsonProperty(JSON_PROPERTY_COMMAND)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCommand(@jakarta.annotation.Nonnull List<String> command) {
    this.command = command;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CommandSubmission commandSubmission = (CommandSubmission) o;
    return Objects.equals(this.compoundIds, commandSubmission.compoundIds) &&
        Objects.equals(this.alignedFeatureIds, commandSubmission.alignedFeatureIds) &&
        Objects.equals(this.command, commandSubmission.command);
  }

  @Override
  public int hashCode() {
    return Objects.hash(compoundIds, alignedFeatureIds, command);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CommandSubmission {\n");
    sb.append("    compoundIds: ").append(toIndentedString(compoundIds)).append("\n");
    sb.append("    alignedFeatureIds: ").append(toIndentedString(alignedFeatureIds)).append("\n");
    sb.append("    command: ").append(toIndentedString(command)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

